<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('store_notifications', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('store_id');
            $table->string('type')->comment('通知类型');
            $table->string('notification_name')->comment('通知名称');
            $table->unsignedInteger('model_id')->nullable()->comment('关联模型ID');
            $table->boolean('is_actioned')->default(false)->comment('是否已处理');
            //是否同意
            $table->boolean('is_agree')->nullable()->comment('是否同意');
            $table->boolean('need_action')->default(false)->comment('是否需要操作');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('store_notifications');
    }
};
